//
//  MoneyViewController.m
//  ZiJinLian
//
//  Created by 🐛 on 2017/4/2.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "MoneyViewController.h"
#import "CheckDetailViewController.h"
@interface MoneyViewController ()

@end

@implementation MoneyViewController
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:YES];
    [self showNav];
    UIBarButtonItem*item=[[UIBarButtonItem alloc]initWithTitle:MyString(@"明细") style:UIBarButtonItemStyleDone target:self action:@selector(detailClick)];
    [item setTitleTextAttributes:@{NSFontAttributeName:FontAndStyle14,NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateNormal];
    self.navigationItem.rightBarButtonItem=item;
}
-(void)detailClick{
    CheckDetailViewController *vc=[[CheckDetailViewController alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=MyString(@"我的资金");
    [self creatUI];
    self.view.backgroundColor=HJ_Color(246, 246, 246);
    // Do any additional setup after loading the view.
}
-(void)creatUI{
    UIView *view=[[UIView alloc]initWithFrame:CGRectMake(0, 0, MainW, 130)];
    view.backgroundColor=[UIColor whiteColor];
    [self.view addSubview:view];
    MYLabel *label=[[MYLabel alloc]initWithFrame:CGRectMake(0, 20, MainW, 20)];
    //label.frame=CGRectMake(0, 30, MainW, 20);
    label.text=MyString(@"可用余额");
    label.textAlignment=1;
    label.textColor=TextColor6;
    [view addSubview:label];
    MYLabel *mlabel=[[MYLabel alloc]initWithFrame:CGRectMake(0, 45, MainW, 20)];
    mlabel.text=[NSString stringWithFormat:@"¥ %@",self.dic[@"availableBalance"]];
    mlabel.textColor=TextColor3;
    mlabel.textAlignment=1;
    mlabel.font=[UIFont systemFontOfSize:18];
    [view addSubview:mlabel];
    UIView*v=[[UIView alloc]initWithFrame:CGRectMake(0, 77, MainW, 1)];
    //[ZJUITools getHCutLine];
    v.backgroundColor=HJ_Color(246, 246, 246);
    [view addSubview:v];
    MYLabel *Alllabel=[[MYLabel alloc]initWithFrame:CGRectMake(0, 87, MainW/2, 20)];
    Alllabel.text=MyString(@"总金额");
    Alllabel.textColor=TextColor6;
    Alllabel.textAlignment=1;
    [view addSubview:Alllabel];
    MYLabel *Tilabel=[[MYLabel alloc]initWithFrame:CGRectMake(MainW/2, 87, MainW/2, 20)];
    Tilabel.text=MyString(@"提现中的余额");
    Tilabel.textAlignment=1;
    Tilabel.textColor=TextColor6;
    [view addSubview:Tilabel];
    UIView*v1=[[UIView alloc]initWithFrame:CGRectMake(MainW/2, 77, 1, 53)];
    v1.backgroundColor=HJ_Color(246, 246, 246);
    [view addSubview:v1];
    MYLabel *mmlabel=[[MYLabel alloc]initWithFrame:CGRectMake(0, 107, MainW/2, 20)];
    mmlabel.text=[NSString stringWithFormat:@"¥ %@",self.dic[@"balance"]];
    mmlabel.textColor=TextColor3;
    mmlabel.textAlignment=1;
    [view addSubview:mmlabel];
    MYLabel *ttlabel=[[MYLabel alloc]initWithFrame:CGRectMake(MainW/2, 107, MainW/2, 20)];
    ttlabel.text=[NSString stringWithFormat:@"¥ %@",self.dic[@"cashAmount"]];
    ttlabel.textColor=TextColor3;
    ttlabel.textAlignment=1;
    [view addSubview:ttlabel];

    
}
@end
